<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link href="css/common.css?v=0.2" rel="stylesheet">
    <link href="css/index.css?v=0.3" rel="stylesheet">
    <meta name="description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="keyword" content="">
</head>
<body class="o-hidden">
<header>
    <div class="header">
        <div class="bar">
            <div class="layout">
                <div class="location" onclick="openSelCityWin();">
                    <i class="icon-location"></i>
                    <span class="_name">深圳</span>
                    <i class="icon-down"></i>
                    <span class="_line"></span>
                    <i class="icon-user"></i>
                    <i class="icon-cart"></i>
                </div>
                <div class="r_block">
                    <span class="ft14">客服电话：4006-517-217 / 0755-36885360</span>
                    <div class="split_line" style=""></div>
                    <i class="icon-help"></i>
                    <span class="ft12" style="margin-right: 20px;"><a href="#" title="订购指南">订购指南</a></span>
                    <i class="sprite icon-menu"></i>
                    <span class="ft12"><a href="#" title="手机版">网站导航</a></span>

                </div>
                <div class="clear">
                </div>

            </div>
        </div>
    </div>
    <nav>
        <div class="nav">
            <div class="layout" style="height: 100%;">
                <a href="#"><div class="logo f_l"></div></a>
                <div class="nav_list">
                    <div class="split_line"></div>
                    <div class="item"><h5><a><span class="ft12">MAIN</span><br/>首页</a></h5></div>
                    <div class="split_line"></div>
                    <div class="item cur"><h5><a><span class="ft12">BIRTHDAY CAKE</span><br/>生日蛋糕</a></h5></div>
                    <div class="split_line"></div>
                    <div class="item"><h5><a><span class="ft12">EXCLUSIVE</span><br/>专属生日会</a></h5></div>
                    <div class="split_line"></div>
                    <div class="item"><h5><a><span class="ft12">SURROUNDING</span><br/>生日周边</a></h5></div>
                    <div class="split_line"></div>
                    <div class="item">
                        <h5><a><span class="ft12">BRAND STORY</span><br/>品牌故事</a></h5>
                    </div>
                </div>
                <div class="f_r tc" style="height: 100%;align-items: center;padding-top: 38px;">
                    <div style="border: 1px solid #eee;border-radius: 5px;width: 180px;color: #fff;height: 24px;font-size: 14px;">
                        <a class="nav_link">家庭烘焙教室</a>
                        <span class="split_line" style="float: none;width: 1px;display: inline-block;height: 14px;margin: 0px 2px;position: relative;top: 2px;"></span>
                        <a class="nav_link">散漫后花园</a>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </nav>

</header>
<div id="add-height">
    <div class="icon-scroll">
        <i class="icon-scroll-tip"></i>
    </div>
</div>
<div class="s1">
    <div class="_mask"></div>
    <div class="_text">
        <div class="logoo"></div>
        <p class="_text1"><span style="display: inline-block;padding-left: 100%;"></span></p>
        <p class="_text2"></p>
    </div>
</div>
<div class="home-banner" id="b04">
    <ul class="reset-ul">
        <li>
            <a href="#"><div style="width: 100%;padding-top: 30.83%;background-image: url(images/banner01.jpg);background-size: 100% auto;"></div></a>
        </li>

        <li>
            <a href="#"><div style="width: 100%;padding-top: 30.83%;background-image: url(images/banner02.jpg);background-size: 100% auto;"></div></a>
        </li>

        <li>
            <a href="#"><div style="width: 100%;padding-top: 30.83%;background-image: url(images/banner03.jpg);background-size: 100% auto;"></div></a>
        </li>

        <li>
            <a href="#"><div style="width: 100%;padding-top: 30.83%;background-image: url(images/banner04.png);background-size: 100% auto;"></div></a>
        </li>
    </ul>
</div>
<div class="section01">
    <div style="">
        <div class="_item f_l">
            <a href="#" class="_link">
                <div class="circle01"></div>
                <div class="_animate01"></div>
            </a>
            <a class="_text">
                <span style="color: #885f3f" class="ft18">生日蛋糕</span><br/>
                <span style="color: #bfaea0;" class="ft12">Birthday cake</span>
            </a>
        </div>

        <div class="_item">
            <a href="#" class="_link">
                <div class="circle01"></div>
                <div class="_animate02"></div>
            </a>
            <a class="_text">
                <span style="color: #885f3f" class="ft18">生日蛋糕</span><br/>
                <span style="color: #bfaea0;" class="ft12">Birthday cake</span>
            </a>
        </div>

        <div class="_item f_r">
            <a href="#" class="_link">
                <div class="circle01"></div>
                <div class="_animate03"></div>
            </a>
            <a class="_text">
                <span style="color: #885f3f" class="ft18">生日蛋糕</span><br/>
                <span style="color: #bfaea0;" class="ft12">Birthday cake</span>
            </a>
        </div>

    </div>
</div>
<div class="section02">
    <div style="height: 30px;"></div>
    <div style="margin: 0 auto">
        <p class="ft20" style="color: #885f3f">人气经典</p>
        <p style="width: 40px;border-top: 1px solid #f86522;margin: 10px auto;"></p>
        <p class="ft12" style="width: 85px;color: #bfaea0;margin: 0 auto;">
            Popular classic recommend
        </p>
    </div>
    <div class="layout">
        <div class="list">
            <div class="item">
                <a><img src="images/cake01.jpg" width="220" height="220"></a>
                <a class="ft14" style="color: #885f3f">蓝莓红丝绒蛋糕</a>
                <p class="ft12" style="color: #ff6600;margin: 10px 0;">￥208.00/2.0磅</p>
                <a class="_btn"><i class="icon-add-cart"></i>加入购物车</a>
            </div>

            <div class="item">
                <a><img src="images/cake01.jpg" width="220" height="220"></a>
                <a class="ft14" style="color: #885f3f">蓝莓红丝绒蛋糕</a>
                <p class="ft12" style="color: #ff6600;margin: 10px 0;">￥208.00/2.0磅</p>
                <a class="_btn"><i class="icon-add-cart"></i>加入购物车</a>

            </div>

            <div class="item">
                <a><img src="images/cake01.jpg" width="220" height="220"></a>
                <a class="ft14" style="color: #885f3f">蓝莓红丝绒蛋糕</a>
                <p class="ft12" style="color: #ff6600;margin: 10px 0;">￥208.00/2.0磅</p>
                <a class="_btn"><i class="icon-add-cart"></i>加入购物车</a>

            </div>

            <div class="item">
                <a><img src="images/cake01.jpg" width="220" height="220"></a>
                <a class="ft14" style="color: #885f3f">蓝莓红丝绒蛋糕</a>
                <p class="ft12" style="color: #ff6600;margin: 10px 0;">￥208.00/2.0磅</p>
                <a class="_btn"><i class="icon-add-cart"></i>加入购物车</a>

            </div>

            <div class="item">
                <a><img src="images/cake01.jpg" width="220" height="220"></a>
                <a class="ft14" style="color: #885f3f">蓝莓红丝绒蛋糕</a>
                <p class="ft12" style="color: #ff6600;margin: 10px 0;">￥208.00/2.0磅</p>
                <a class="_btn"><i class="icon-add-cart"></i>加入购物车</a>

            </div>

            <div class="item">
                <a><img src="images/cake01.jpg" width="220" height="220"></a>
                <a class="ft14" style="color: #885f3f">蓝莓红丝绒蛋糕</a>
                <p class="ft12" style="color: #ff6600;margin: 10px 0;">￥208.00/2.0磅</p>
                <a class="_btn"><i class="icon-add-cart"></i>加入购物车</a>

            </div>

            <div class="clear"></div>

        </div>
        <a class="ft12" style="color: #885f3f;display: block;margin: 20px auto 0 0;text-decoration: underline;">more+</a>
        <div style="height: 60px;"></div>
    </div>
</div>
<div class="slider-menu">
    <a class="item" style="background: url(images/slider-icon01.png) no-repeat center top">
        <span>购物车</span>
        <div class="badge">14</div>
    </a>
    <a class="item" style="background: url(images/slider-icon02.png) no-repeat center top">
        <span>在线购物</span>
    </a>
    <a class="item" style="background: url(images/slider-icon03.png) no-repeat center top">
        <span>新人红包</span>
    </a>
    <a class="item" id="btn-scroll-top" style="border: 0;background: url(images/slider-icon04.png) no-repeat center top">
        <span>回顶部</span>
    </a>
</div>
<div style="height: 75px;"></div>
<div class="fix-bg">
    <div class="bg01"></div>
    <div class="bg02"></div>
    <div class="bg03"></div>
    <div class="bg04"></div>
</div>
<div id="scroll-top"></div>

<footer>
    <div class="footer">
        <div class="layout" style="position: relative">
            <div class="logo-small"></div>
            <p class="copyright">Copyright© 深圳壹点壹客食品有限公司版权所有 ICP备案证书号:粤ICP备11021841号</p>
            <a class="f_l"><img src="images/icon-weibo.png" width="22" height="17" style="margin-right: 10px;"></a>
            <a class="f_l qr-a" style="position: relative"><img src="images/icon-wx.png" width="21" height="17" style="margin-top: 29px;position: relative">

            </a>
            <div class="qr">
                <img src="images/qr-sz.jpg">
            </div>
            <div class="_link">
                <a style="border: 0;">订购指南</a>
                <a>配送范围</a>
                <a>壹club</a>
                <a>联系我们</a>
                <a>集团订购</a>
                <a>食品生产许可证</a>
            </div>
        </div>
    </div>
</footer>
</body>
<script src="js/jquery-1.8.2.min.js"></script>
<script src="js/unslider.min.js?v=0.1"></script>
<script>

    !function () {
        function e() {
            $("#b04").css({
                'min-height':    document.body.clientWidth*0.3083+"px"
            });
            $("#scroll-top").css({right:(document.body.clientWidth-1200)/2+"px"})
        }

        var t = null;
        window.onresize = function () {
            clearTimeout(t), t = setTimeout(e, 300)
        };
        e();
    }(window);


    var clientHeight = document.body.clientHeight;
    $(function(){
        setTimeout(function(){
            console.log('window.scrollTo(0,0);');
            window.scrollTo(0,0);
        },500);
        $("#btn-scroll-top").click(function(){
            $("html,body").animate({scrollTop:0},600);
        });
        var unslider04 = $('#b04').unslider({
            dots: true,fluid:true,delay:3000,autoplay:true
        });
        var $nav = $(".nav");
        var $logoo = $(".s1 .logoo");
        var $_text1 = $(".s1 ._text1");
        var $_text2 = $(".s1 ._text2");
        var $footer = $(".footer");
        var $body = $("body");
        var $section01 = $(".section01");
        var diff = (document.body.clientWidth>1500?300:0);
        var scrollOnce = 0;
        setTimeout(function(){
            if(scrollOnce===0){
                $("html,body").animate({scrollTop:clientHeight-32-106},1000,function(){
                    $(".section01").addClass("active");
                });
            }
            $footer.removeClass('show');
        },8000);

        $(".qr-a").on('mouseover',function(){
            $(".qr").fadeIn();
        });
        $(".qr-a").on('mouseout',function(){
            $(".qr").fadeOut();
        });

        $("#add-height").css({'height':clientHeight-$(".header").get(0).offsetHeight+"px"});
        $(".fix-bg").css({'min-height':clientHeight});
        setTimeout(function(){
            $(".s1").addClass('active');
        },1000);
        setTimeout(function(){
            $(".s1 ._mask").hide();
            $(".s1").css({'z-index':1});
            $footer.addClass('show');
            $body.removeClass('o-hidden');

            var s1Hide = 0;
            var lastScrollTop = 0;
            var func_scroll = function(){
                var scrollTop=document.documentElement.scrollTop||document.body.scrollTop;
                var scrollHeight=document.documentElement.scrollHeight||document.body.scrollHeight;
//                console.log(scrollTop,lastScrollTop);
                if(scrollTop>=lastScrollTop){
                    if(scrollTop>clientHeight&&!$nav.hasClass('hide')){
                        //滚动超过一屏高度时
//                        console.log("滚动超过一屏高度时");
                        $nav.addClass('hide');
                    }
                    if(scrollTop+clientHeight>=scrollHeight-100){
                        $footer.addClass('show');
                    }
                }else{
                    if(scrollTop<=clientHeight){
                        $nav.removeClass('hide');
                    }
                    $footer.removeClass('show');
                }
//                if(scrollTop>$section01.get(0).offsetTop-356-diff){
                if(scrollTop>document.body.clientWidth*0.3083+clientHeight-650){
                    $(".section01").addClass("active");
                }
                setTimeout(function(){
                    lastScrollTop = scrollTop;
                },100);

                if(s1Hide){return;}
                var top = (50-scrollTop/(clientHeight/2)*100)+"%";
                var opacity = (1-3*scrollTop/(clientHeight/2)).toFixed(2);
                if(opacity<0){
//                    $('body')[0].onscroll = function(){};
                    $('.s1').hide();
                    $('.icon-scroll').fadeOut();
                    s1Hide = 1
                }
                opacity = opacity<0?0:opacity;
                $logoo.css({top:top,opacity:opacity});
                $_text1.css({top:top,opacity:opacity});
                $_text2.css({top:top,opacity:opacity});
            };
            func_scroll();

            setTimeout(function(){
                $("#b04").css({
                    'min-height':    document.body.clientWidth*0.3083+"px"
                });
            })

            var t = null;
            window.onscroll = function(){
                if(scrollOnce==0){
                    $("html,body").animate({scrollTop:clientHeight-32-106},1000,function(){
                        $(".section01").addClass("active");
                    });
                    scrollOnce = 1;
                }

                func_scroll();
//                clearTimeout(t),setTimeout(func_scroll,300);
            }
        },3000);
        setTimeout(function(){
            var i = 0;
            var f = function(){
                $divs.eq(i%4).addClass('in');
                var _f = function(i){
                    return function(){
                        $divs.eq(i%4-1).removeClass('in');
                    }
                }(i)
                setTimeout(_f,1500);
                i++;
            };
            f();
            setInterval(f,3500);
        },2000);
        var $divs = $(".fix-bg div");

    })
</script>
</html>